home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / lxlt113.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1996-05-06  |  4KB  |  117 lines

  1. /***********************************/
  2. /* lxLite installation script file */
  3. /***********************************/
  4.  '@echo off'
  5.  'cls'
  6.  call rxFuncAdd "SysOS2Ver", "RexxUtil", "SysOS2Ver"
  7.  call rxFuncAdd "SysGetKey", "RexxUtil", "SysGetKey"
  8.  say "═══════ FRIENDS software presents ═══════"
  9.  say "╖  \//        An  OS/2 executables packer"
  10.  say "╜─╜//\  ╖     Lots  of  features, maximal"
  11.  say "  //╖  ╖╫─╓─╖ compression, nice interface"
  12.  say " // ╜─╜╨╙─╙── R·E·L·E·A·S·E V·E·R·S·I·O·N"
  13.  say "═════════════════════════════════════════"
  14.  version = SysOS2Ver()
  15.  parse value version with hiver "." lover
  16.  say "OS/2 version "version" detected"
  17.  
  18.  say "********************************************************************"
  19.  say "Please enter the destination directory for program, ex: C:\OS2\APPS:"
  20.  pull destDir
  21.  if (length(destDir) > 3) & (substr(destDir, length(DestDir), 1) = "\")
  22.   then destDir = substr(destDir, 1, length(DestDir) - 1);
  23.  do while stream(destDir,"c","query datetime") = ""
  24.   QueryCreate = Ask("The directory you specified does not exist. Create it? (Y/N)", "YN")
  25.   select
  26.    when QueryCreate = "Y"
  27.     then 'mkDir 'destDir' 1>nul 2>nul'
  28.    otherwise
  29.     say "Aborting..."
  30.     exit
  31.   end
  32.  end
  33.  QueryUtility = Ask("Install lxLite utility pack? (Y/N)", "YN");
  34.  
  35.  say "********************************************************************"
  36.  
  37.  if ((hiver >= 2) & (lover >= 20)) /* Repack using Lempel-Ziv for OS/2 v>=2.20 */
  38.   then do
  39.         say "Please wait, repacking lxLite using advanced compression method"
  40.         say "Supported by OS/2 2.99 and above (Warp)"
  41.         'lxLite /y lxLite.exe'
  42.         'del lxLite2x.cfg 1>nul 2>nul'
  43.        end
  44.   else do
  45.         say "Your OS/2 version does not support Lempel-Ziv compression method"
  46.     'lxLite /y /x chCase.exe unLock.exe colMng.exe noEA.exe'
  47.         'del lxLite.cfg 1>nul 2>nul'
  48.         'ren lxLite2x.cfg lxLite.cfg 1>nul 2>nul'
  49.        end
  50.  
  51.  say "********************************************************************"
  52.  call CopyFile "lxLite.exe"
  53.  call CopyFile("lxLite.cfg")
  54.  call CopyFile("stub_min.bin")
  55.  call CopyFile("stub_vdm.bin")
  56.  call CopyFile("lxLite.eng")
  57.  call CopyFile("lxLite.rus")
  58.  call CopyFile("lxLite.ger")
  59.  if (QueryUtility = "Y")
  60.   then do
  61.     call CopyFile("chCase.exe")
  62.     call CopyFile("colMng.exe")
  63.     call CopyFile("noEA.exe")
  64.     call CopyFile("unLock.exe")
  65.     call CopyFile("AndyCols.ini")
  66.     call CopyFile("lxUtil.eng")
  67.        end
  68.  say "********************************************************************"
  69.  if Ask("Installation complete. Do you want to read the WHATSNEW file now?", "YN") = "Y"
  70.   then do
  71.         'cls'
  72.         'type whatsnew | more'
  73.         Ask("Press Space to continue", " ")
  74.     'cls'
  75.        end
  76.  if Ask("Do you wish to clean the install source directory? (Y/N)", "YN") = "Y"
  77.   then do
  78.         say "Please wait, cleaning up ..."
  79.         'del lxLite??.* 1>nul 2>nul'
  80.         'del chCase*.* 1>nul 2>nul'
  81.         'del noEA*.* 1>nul 2>nul'
  82.         'del colMng*.* 1>nul 2>nul'
  83.         'del unLock*.* 1>nul 2>nul'
  84.         'del lxUtil*.* 1>nul 2>nul'
  85.         'del stub_*.* 1>nul 2>nul'
  86.         'del AndyCols.ini 1>nul 2>nul'
  87.         'del whatsnew 1>nul 2>nul'
  88.         'del file_id.diz 1>nul 2>nul'
  89.         'attrib -r %0 >nul'
  90.         'del %0 1>nul 2>nul'
  91.        end
  92.  'cls'
  93.  say "              Just another fine product from"
  94.  say "                    ╖──────────────╖──╖"
  95.  say "                    ║─╖╖─╖╖╓─╖╖─╖╓─╢╓──"
  96.  say "                    ╜  ╜  ╨╙──╜ ╙╙─╙──╜"
  97.  say "                      s·o·f·t·w·a·r·e"
  98.  say "To contact me, write to: Andrew Zabolotny, 2:5030/84.5@FIDOnet"
  99.  say "                 e-mail: bit@freya.etu.ru"
  100. exit
  101.  
  102. CopyFile:
  103.  arg fName
  104.  say "Copying "fName" -> "destDir"\"fName
  105.  'copy 'fName destDir' 1>nul 2>nul'
  106. return
  107.  
  108. Ask:
  109.  parse arg Question,Reply
  110.  rc = charOut(, Question)
  111.  do until Pos(Answer, Reply) \= 0
  112.   KeyIn = SysGetKey("noecho")
  113.   parse upper var KeyIn Answer
  114.  end
  115.  say Answer
  116. return Answer
  117.